package code.rocky.chapter03;

// 建议42：让工具类不可实例化
public class Suggest42 {

    /**
     * Don't let anyone instantiate this class.
     * java反射修改权限。改成 private + 抛异常
     */
    // private Suggest42() {}

    public Suggest42() {throw new Error("不要实例化我!");}

    public static void main(String[] args) {
        Suggest42 suggest42 = new Suggest42();
    }
}
